Skip to content

Conversation

@JamesVorder
Copy link
Contributor

This PR adds support for Databricks' version-based time travel. This is a next step toward resolving #2006, following #2134.

The following is now supported:

SELECT 1 FROM t1 VERSION AS OF 10;

Note: This PR makes a couple opinionated changes:

  • When parsing a version to time-travel to, only scalar values are allowed. This is consistent with the limitations of Databricks. None of the other target query engines support time travel by version.
  • I've made the assumption that we want to parse VERSION AS OF syntax for all dialects that support time travel, regardless of downstream support for that syntax. (Consistent with guidance given here.)
  • I've refactored supports_timestamp_versioning --> supports_table_versioning, since we now support table versioning by something other than a timestamp.

@JamesVorder
Copy link
Contributor Author

@iffyio I would love a review if you have time.

Copy link
Contributor

@iffyio iffyio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @JamesVorder!

@iffyio iffyio added this pull request to the merge queue Jan 20, 2026
Merged via the queue into apache:main with commit 6060a11 Jan 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants